package cn.itcast.bos.service;

import java.util.Date;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;

public interface PromotionService {
	/**
	 * 保存
	 * @param promotion
	 */
	void save(Promotion promotion);

	/**
	 *  无条件分页查询
	 * @param pageable
	 * @return
	 */
	Page<Promotion> pageQuery(Pageable pageable);

	/**
	 * 分页查询
	 * @param page
	 * @param rows
	 * @return
	 */
	@GET
	@Path("/findPageDate")
	@Consumes({"application/xml","application/json"})
	@Produces({"application/xml","application/json"})
	PageBean<Promotion> findPageDate(@QueryParam("page") Integer page,@QueryParam("rows") Integer rows);
	
	@GET
	@Path("/findDetailById/{id}")
	@Consumes({"application/xml","application/json"})
	@Produces({"application/xml","application/json"})
	Promotion findDetailById(@PathParam("id") Integer id);

	void updateStatus(Date date);
	
}
